<template>
  <div class="auth-redirect">
    <div class="loading-container">
      <div class="loading-spinner"></div>
      <p>正在跳转...</p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'AuthRedirect',
  created() {
    const hash = this.$route.query.redirect || '/'
    this.$router.replace(hash)
  }
}
</script>

<style scoped>
.auth-redirect {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f5f5;
}

.loading-container {
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #409eff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

p {
  color: #666;
  font-size: 14px;
  margin: 0;
}
</style>